//  ========== 
//  = 公告详情
//  ==========
var page = 1;
var limit = 8;
var Main = function(){
	mui.init({
		swipeBack:true 		//启用右滑关闭功能
	});
	this.init();
	this.loadData();
};
Main.prototype = {
	init : function(){
		mui('.mui-scroll-wrapper').scroll({
			indicators: true //是否显示滚动条
		});
		var _this = this;
		
		_this.eventInit()
		
	},
	eventInit : function(){//绑定事件
	},

	//内容列表
	loadData : function(_callback){
		var _this = this;
		var param = {
				isMobile:1,
				catId:Util.requestURL('id')
				};
		var url = server_url+'/article/newscontentArticle.do';
		$.getJSON(url,param  ,function(data){
			var _html = '';
			if(data.success){
				var item = data.result[0];
	           $(".tit").html(item.title);
	           $(".time").html(item.createDate);
	           $(".mui-content-padded").html(item.content);
	           $(".mui-content-padded img").each(function(){
	           	if($(this).attr('src').indexOf('http')<0){
	           	$(this).attr('src',server_url+$(this).attr('src'));	
	           	}
	           });
	           
	           $(".mui-content-padded a").each(function(){
	           	if($(this).attr('href').indexOf('http')<0){
	           	$(this).attr('href',server_url+$(this).attr('href'));	
	           	}
	           });
            }			
             
             if($.isFunction(_callback)){
             	_callback();
             }
		});
	}
	
}
